package com.zwh.mangomall.util;

import org.springframework.util.DigestUtils;

public class Md5Util {

    private static final Integer HASH_COUNT = 5;

    // 加密处理
    public static String passwordMD5(String salt, String password){

        String md5 = salt + password + salt;
        for (int i=0; i<HASH_COUNT; i++){
            md5 = DigestUtils.md5DigestAsHex(md5.getBytes());
        }

        return md5;
    }

}
